<?php 


header("Content-type: image/png");


$src = imageCreateFrompng('./bg.png');
$dst = imageCreateFrompng('./logo.png');


$swidth = imagesx($src);
$sheight = imagesy($src);
$dwidth = imagesx($dst);
$dheight = imagesy($dst);


// imagecopy ( $src , $dst , $swidth-$dwidth , $sheight-$dheight , 0 , 0 , $dwidth , $dheight);

// imagecopymerge ( $src , $dst , $swidth-$dwidth , $sheight-$dheight , 0 , 0 , $dwidth , $dheight,50);
// 
imagecopyresized( $src , $dst , $swidth-$dwidth , $sheight-$dheight , 0 , 0 , $dwidth/2 , $dheight/2,$dwidth , $dheight);

// 输出图片
imagepng($src);  









 ?>